package com.coin900.coin.service.sop;

import com.coin900.coin.persist.sop.SopButtonVO;
import com.value.mybatis.IDaoRouter;
import com.value.mybatis.Pagination;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author shui
 * @create 2018-01-05
 **/
@Service
public class SopButtonService implements ISopButtonService {

    @Override
    public List<SopButtonVO> loadSopButton(Map<String, Object> params) {
        return this.daoRouter.query("SopButton.loadSopButton", params);
    }

    @Override
    public List<SopButtonVO> loadSopButtonForPage(Pagination pagination) {
        return this.daoRouter.query("SopButton.loadSopButtonForPage", pagination);
    }

    @Override
    public void insertSopButton(SopButtonVO sopButtonVO) {
        this.daoRouter.insert("SopButton.insertSopButton", sopButtonVO);
    }

    @Override
    public void updateSopButton(SopButtonVO sopButtonVO) {
        this.daoRouter.update("SopButton.updateSopButton", sopButtonVO);
    }

    @Override
    public void deleteSopButton(SopButtonVO sopButtonVO) {
        this.daoRouter.update("SopButton.deleteSopButton", sopButtonVO);
    }

    @Autowired
    private IDaoRouter daoRouter;

}